Skip to content

Rollup of 11 pull requests #145450

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 27 commits into from
Aug 15, 2025
Merged

Rollup of 11 pull requests #145450

merged 27 commits into from
Aug 15, 2025

Conversation

Kobzol
Copy link
Member

@Kobzol Kobzol commented Aug 15, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

marcoieni and others added 27 commits August 14, 2025 12:38
Currently, when setting the thread stack size fails, it would be rounded
up to the nearest multiple of the page size and the code asserts that
the next call to pthread_attr_setstacksize succeeds.

This may be true for glibc, but it isn't true for musl, which not only
enforces a minimum stack size, but also a maximum stack size of
usize::MAX / 4 - PTHREAD_STACK_MIN [1], triggering the assert rather
than erroring gracefully.

There isn't any way to handle this properly other than bailing out and
letting the user know it didn't succeed.

[1]: https://git.musl-libc.org/cgit/musl/tree/src/thread/pthread_attr_setstacksize.c#n5

Signed-off-by: Jens Reidel <[email protected]>
In the process, fix a race condition, by never truncating or writing to
the file unless we currently hold the lock.
Extracting the Rust tarballs doesn't require this.
equivelent -> equivalent
recommeded -> recommended
When a UI test runs a compiled binary and an error/forbid pattern
check fails, the failure message previously only showed compiler output,
hiding the executed programs stdout/stderr. This makes it harder to
see near-miss or unexpected runtime lines.
…r=jhpratt

std: thread: Return error if setting thread stack size fails

Currently, when setting the thread stack size fails, it would be rounded up to the nearest multiple of the page size and the code asserts that the next call to `pthread_attr_setstacksize` succeeds.

This may be true for glibc, but it isn't true for musl, which not only enforces a minimum stack size, but also a maximum stack size of `usize::MAX / 4 - PTHREAD_STACK_MIN` [1], triggering the assert rather than erroring gracefully.

There isn't any way to handle this properly other than bailing out and letting the user know it didn't succeed.

[1]: https://git.musl-libc.org/cgit/musl/tree/src/thread/pthread_attr_setstacksize.c#n5
…ouxu

Reduce usage of `compiler_for` in bootstrap

While working on refactoring/fixing `dist` steps, I realized that `build.full-bootstrap` does much more than it should, and that it its documentation is wrong. It seems that the main purpose of this option should be to enable/disable stdlib/compiler uplifting (https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Purpose.20of.20.60build.2Efull-bootstrap.60/with/533985624), but currently it also affects staging, or more precisely which compiler will be used to build selected steps, because this option is used in the cursed `compiler_for` function.

I would like to change the option it so that it *only* affects uplifting, and doesn't affect stage selection, which I (partially) did in this PR. I removed the usage of `compiler_for` from the `Std` and `Rustc` steps, and explicitly implemented uplifting, without going through `compiler_for`.

The only remaining usages of `compiler_for` are in dist steps (which I'm currently refactoring, will send a PR later) and test steps (which I will take a look at after dist). After that we can finally remove the function.

I tried to document the case when uplifting was happening during cross-compilation, which was very implicit before. I also did a slight change in the uplifting logic for rustc when cross-compiling. Before, we would attempt to uplift a stage1 rustc, but that is not really a thing when cross-compiling.

r? `@jieyouxu`
…-windows, r=Kobzol

ci: clean windows disk space in background
…heck-split, r=jieyouxu

Split codegen backend check step into two and don't run it with `x check compiler`

This reduces the amount of work that is done during `x check compiler`. We still check both backends during `x check` by defaut, even if they are not in `rust.codegen-backends`, as just checking them shouldn't require expensive preparations, like building GCC.

r? `@jieyouxu`
…=petrochenkov

Deduplicate -L search paths

For each -L passed to the compiler, we eagerly scan the whole directory. If it has a lot of files, that results in a lot of allocations. So it's needless to do this if some -L paths are actually duplicated (which can happen e.g. in the situation in the linked issue).

This PR both deduplicates the args, and also teaches rustdoc not to pass duplicated args to merged doctests.

Fixes: rust-lang#145375
…, r=clubby789

bootstrap: Reduce dependencies

Eliminate the `fd-lock` dependency by using the new native locking in std.

Eliminate the `xattr` dependency by turning off a feature flag in `tar`, since
the tarballs that we extract with bootstrap don't need it.
… r=lqd

Fix typos in bootstrap.example.toml

Founds these small typos while looking around.

`equivelent` -> `equivalent`
`recommeded` -> `recommended`

cheers :)
…r=lqd

Fix wrong spans with external macros in the `dropping_copy_types` lint

This PR fixes some wrong spans manipulations when external macros are involved.

Specifically we didn't make sure the spans had the same context, which kind-of make our spans manipulations go wrong and produce weird spans. We fix that by making sure they have the same context.

Fixes rust-lang#145427
Enhance UI test output handling for runtime errors

When a UI test runs a compiled binary and an error/forbid pattern check fails, the failure message previously only showed compiler output, hiding the executed programs stdout/stderr. This makes it harder to see near-miss or unexpected runtime lines.

Fixed rust-lang#141531
Supersedes rust-lang#141977
Autolabel `src/tools/{rustfmt,rust-analyzer}` changes with `T-{rustfmt,rust-analyzer}`

Make e.g. rust-lang#144323 more obvious who should be reviewing it and easier to filter.
@rustbot rustbot added A-CI Area: Our Github Actions CI A-compiletest Area: The compiletest test runner A-meta Area: Issues & PRs about the rust-lang/rust repository itself labels Aug 15, 2025
@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc O-unix Operating system: Unix-like O-windows Operating system: Windows S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Aug 15, 2025
@Kobzol
Copy link
Member Author

Kobzol commented Aug 15, 2025

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Aug 15, 2025

📌 Commit 9bf76ab has been approved by Kobzol

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 15, 2025
@bors
Copy link
Collaborator

bors commented Aug 15, 2025

⌛ Testing commit 9bf76ab with merge 8b1889c...

@bors
Copy link
Collaborator

bors commented Aug 15, 2025

☀️ Test successful - checks-actions
Approved by: Kobzol
Pushing 8b1889c to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 15, 2025
@bors bors merged commit 8b1889c into rust-lang:master Aug 15, 2025
11 checks passed
@rustbot rustbot added this to the 1.91.0 milestone Aug 15, 2025
@Kobzol Kobzol deleted the rollup-cqclix0 branch August 15, 2025 18:52
Copy link
Contributor

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing c018ae5 (parent) -> 8b1889c (this PR)

Test differences

Show 10 test diffs

Stage 0

  • core::builder::tests::snapshot::clippy_bootstrap: pass -> [missing] (J0)
  • core::builder::tests::snapshot::clippy_ci: pass -> [missing] (J0)
  • core::builder::tests::snapshot::clippy_compiler_stage1: pass -> [missing] (J0)
  • core::builder::tests::snapshot::clippy_compiler_stage2: pass -> [missing] (J0)
  • core::builder::tests::snapshot::clippy_miri_stage1: pass -> [missing] (J0)
  • core::builder::tests::snapshot::clippy_miri_stage2: pass -> [missing] (J0)
  • core::builder::tests::snapshot::clippy_std_stage1: pass -> [missing] (J0)
  • core::builder::tests::snapshot::clippy_std_stage2: pass -> [missing] (J0)

Additionally, 2 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 8b1889cc22439e02cf03cd8cff9764a307b21193 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. dist-aarch64-linux: 8452.9s -> 5732.0s (-32.2%)
  2. x86_64-apple-2: 3988.7s -> 5177.2s (29.8%)
  3. dist-x86_64-netbsd: 4683.5s -> 5598.7s (19.5%)
  4. x86_64-apple-1: 10539.6s -> 8811.4s (-16.4%)
  5. dist-apple-various: 4877.3s -> 5628.7s (15.4%)
  6. aarch64-gnu-debug: 4628.5s -> 5222.7s (12.8%)
  7. arm-android: 6274.9s -> 7025.4s (12.0%)
  8. dist-powerpc64le-linux-gnu: 5755.5s -> 5177.9s (-10.0%)
  9. aarch64-gnu-llvm-19-1: 3958.1s -> 3582.9s (-9.5%)
  10. pr-check-1: 1794.1s -> 1628.8s (-9.2%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#144210 std: thread: Return error if setting thread stack size fails 752139cad7d83e48c5a0666e4d12fa8d6770e9ba (link)
#145310 Reduce usage of compiler_for in bootstrap 8d88cf5138c439ebe47a28d9635a3fca1551a86f (link)
#145311 ci: clean windows disk space in background 260295b160b7a32f2fa910ede363ca144e9a2344 (link)
#145340 Split codegen backend check step into two and don't run it … 6ba1784ce8fb2a915f0c38a507461c61e403aa26 (link)
#145408 Deduplicate -L search paths 9cb2db30af44cd8f81911b228b629245382efa51 (link)
#145412 Windows: Replace GetThreadId+GetCurrentThread with `Get… d4752a53b49cd94bec7eab5176aa076649ec3dce (link)
#145413 bootstrap: Reduce dependencies 22d7fb0456a6d80006150c0a522f01c70e86bd09 (link)
#145426 Fix typos in bootstrap.example.toml ffef013581fde6db6c4ae0e2888a130ec39f6129 (link)
#145430 Fix wrong spans with external macros in the `dropping_copy_… accbf74079b06050db4aa8a7a5648bfc18c6c4eb (link)
#145431 Enhance UI test output handling for runtime errors fe04cd5d443795a2b00621a28e8cfea4ff21dc30 (link)
#145448 Autolabel src/tools/{rustfmt,rust-analyzer} changes with … 62bbd4612024d385651434da8f203d3c911c0421 (link)

previous master: c018ae5389

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (8b1889c): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were already notified of this PR).

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
3.5% [3.5%, 3.5%] 1
Regressions ❌
(secondary)
0.0% [0.0%, 0.0%] 1
Improvements ✅
(primary)
-0.2% [-0.2%, -0.2%] 7
Improvements ✅
(secondary)
-0.3% [-0.3%, -0.2%] 7
All ❌✅ (primary) 0.2% [-0.2%, 3.5%] 8

Max RSS (memory usage)

Results (secondary -1.4%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.4% [-1.4%, -1.4%] 1
All ❌✅ (primary) - - 0

Cycles

Results (primary 2.9%, secondary -3.8%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.9% [2.9%, 2.9%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.8% [-4.4%, -3.1%] 9
All ❌✅ (primary) 2.9% [2.9%, 2.9%] 1

Binary size

Results (primary 0.4%, secondary 0.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
0.4% [0.0%, 0.8%] 2
Regressions ❌
(secondary)
0.1% [0.1%, 0.1%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.0% [-0.0%, -0.0%] 1
All ❌✅ (primary) 0.4% [0.0%, 0.8%] 2

Bootstrap: 472.048s -> 470.263s (-0.38%)
Artifact size: 377.50 MiB -> 377.48 MiB (-0.00%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-CI Area: Our Github Actions CI A-compiletest Area: The compiletest test runner A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. O-unix Operating system: Unix-like O-windows Operating system: Windows perf-regression Performance regression. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.